﻿@using HynuIOTA.Entity
@using HynuIOTA.Entity.FormatEntity
@{
    List<News> news = ViewBag.news;
    PageData pageData = ViewBag.pageData;
}
<div id="detail2-box" class="clearfix">
    <div id="news-center" class="tabula-box"></div>
    <div class="content-box">
        <h1>@ViewBag.Title</h1>
        <ul>
            @{
                foreach (var item in news)
                {
                    <li class="text"><a href="@($"{Url.Content("~/ShowNews/")}{item.Id}.shtml")" >@(item.IsTop ? "【顶置】" : "")@item.Title</a><span>@item.CreateTime</span></li>
                }
            }
        </ul>
        <div class="tcdPageCode"></div>
    </div>
</div>
@section script
{
    <script>
        $(".tcdPageCode").createPage({
            pageCount: @pageData.PageCount,
            current: @pageData.PageIndex,
            backFn: function (p) {
                window.location.href = '@Url.Content(ViewBag.urlContent)' + p+'.shtml';
            }
        });
        $('#news-center').load('@Url.Action("NewsChannelView","Home")');
    </script>
}
